<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	<!-- imports -->
	<script language="JavaScript" src="../js/FrageHinzufuegen.js"></script>
	<!-- imports -->
		<center><h:outputLabel value="Fragebogen hinzufügen" styleClass="ueberschrift"/></center>
		<h:form id="addNewQuestionSheet">
		<table id="addQuestionSheet_table" class="standart kontoverwaltung">
			<tr>
				<td><h:outputText value="Bezeichnung:" /></td>
				<td><h:inputText value="#{QuestionSheetAddViewBean.label}" /></td>
			</tr>
			<tr>
				<td colspan="2"><center>
					<rich:panel>
						<center><rich:pickList value="#{QuestionSheetAddViewBean.questionList}" sourceCaption="Available Questions" targetCaption="Selected Questions" listWidth="130px" listHeight="260px" orderable="false">
                			<f:selectItems value="#{QuestionSheetAddViewBean.allQuestions}" var="question" itemValue="#{question}" itemLabel="#{question.text}" >
                			</f:selectItems>
                			<f:converter converterId="QuestionConverter"/>
           		 		</rich:pickList></center>
           		 		<hr width="80%" style="margin:5px;"/>
					</rich:panel></center>
				</td>
			</tr>
			<tr>
				<td colspan="2"><center><a4j:commandButton action="#{QuestionSheetAddViewBean.createNewQuestionSheet()}" execute="addNewQuestionSheet" onbegin="#{rich:component('Loadingpopup')}.show();" oncomplete="#{rich:component('Loadingpopup')}.hide();" value="speichern" render="Messagespopup mainmenueform"/></center></td>
			</tr>
		</table>
		</h:form>
		<rich:panel styleClass="newQuestionAnswerChoiceDetailPanel">
		<f:facet name="header">Detail</f:facet>
		<h:inputTextarea id="answerChoiceDetail_addQuestionSheet" style="width: 100%;" readonly="true"/>
		</rich:panel>
														
</ui:composition>